#-*-coding:utf-8-*-
'''
dir.py : contains utilities and wrappers in i/o manipulation about directories
'''

import os.path

def is_dir(path):
    '''
    checks whether path refers to a directory
    '''
    return os.path.isdir(path)


def list_dir(dir):
    '''
    get the list of entries contained in directory
    '''
    if is_dir(dir):
        return os.listdir(dir)
    else : 
        return False
    
def getdirs(path):
    if is_dir(path):
        files = list_dir(path)
    else :
        return False
